package com.ming.feign;

import com.ming.domain.Sku;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author:何元才
 * @Desc:
 * @data:2021-04-09 15:20
 */
@FeignClient(value = "product-service")
public interface OrderProductFeign {


    /**
     * 远程调用根据skuIds查询sku集合
     *
     * @param skuIds
     * @return
     */
    @PostMapping("prod/prod/getSkuListByIds")
    List<Sku> getSkuListByIds(@RequestBody List<Long> skuIds);

    /**
     * 远程调用修改库存
     *
     * @param map
     */
    @PostMapping("prod/prod/changeStock")
    void changeStock(HashMap<String, Map<Long, Integer>> map);
}